package com.aerfazhe.stock.mapper;

import com.aerfazhe.stock.pojo.Order;
import org.apache.ibatis.annotations.Update;

/**
 * @Author：wk
 * @Slogan：无论风雨，和自己一决胜负吧
 * @Create：2022/7/21/16:57
 * @Description：库存数据持久化
 * @Version：1.0
 */
public interface StockMapper {

    @Update("update stock set product_count = product_count-#{totalAmount} where product_id = #{productId}")
    int reductStock(Order order);

}
